﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Profile.aspx.vb" Inherits="NewHotels.Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ID" />
                <asp:BoundField DataField="FirstName" HeaderText="FirstName" 
                    SortExpression="FirstName" />
                <asp:BoundField DataField="LastName" HeaderText="LastName" 
                    SortExpression="LastName" />
                <asp:ImageField DataImageUrlField="Picture" DataImageUrlFormatString="{0}" 
                    HeaderText="Picture">
                </asp:ImageField>
                <asp:BoundField DataField="Description" HeaderText="Description" 
                    SortExpression="Description" />
                <asp:BoundField DataField="TravellerName" HeaderText="TravellerName" 
                    SortExpression="TravellerName" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HotelsConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:HotelsConnectionString.ProviderName %>" 
            SelectCommand="SELECT * FROM [Profiles] WHERE ([TravellerName] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="TravellerName" QueryStringField="TravellerName" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <asp:Button ID="btn_editProfile" runat="server" 
            PostBackUrl="~/editProfile.aspx" Text="Edit Profile" />
    </p>
</asp:Content>
